﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Windows.Media.Imaging;
using System.Threading;
using InstaMe;

namespace InstaMe
{
    public partial class SplashScreenPage : PhoneApplicationPage
    {
        public SplashScreenPage()
        {            
            InitializeComponent();         
        }

        private void PhoneApplicationPage_Loaded_1(object sender, RoutedEventArgs e)
        {
            var thread = new Thread(() =>
            {
                MainProcess.getInstance().PreLoadData();
                Deployment.Current.Dispatcher.BeginInvoke(() => 
                {
                    NavigationService.Navigate(new Uri("/Source/Views/DiaryPage.xaml", UriKind.Relative));
                });
            });
            thread.Start();
        }
    }
}